package com.db.dao;

import java.sql.SQLException;

import javax.sql.DataSource;

import com.db.bean.Leto;
import com.step.web.MyFileUtil;

import cn.hutool.db.Db;
import cn.hutool.db.ds.DSFactory;

public class DU {
	//
	private static DataSource source;

	private static Db db;

	public static Db getDb() {
		if (db == null) {
			db = new Db(getSource());
		}
		return db;
	}

	private static DataSource getSource() {
		if (source == null) {
			source = DSFactory.get();
		}
		return source;
	}

	public static void main(String[] args) {
		try {
			DU.getDb().execute("delete from TB_PORT_WEIGHBRIDGE where id = ?", 1);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
